FROM python:2.7.18-alpine3.11
ENV LC_ALL C.UTF-8
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN mkdir -p /opt/anchore_ui
COPY . /opt/anchore_ui

RUN set -x \
    && pip install -r /opt/anchore_ui/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn \
    && cp /opt/anchore_ui/config.py.sample /opt/anchore_ui/config.py

WORKDIR /opt/anchore_ui
ENTRYPOINT ["python","run.py"]
CMD ["/usr/bin/tail", "-f", "/dev/null"]
